test-prune: Read to the end of cut(1) output
authorSimon McVittie <smcv@debian.org>
Mon, 7 Mar 2022 19:52:25 +0000 (19:52 +0000)
committerSimon McVittie <smcv@debian.org>
Tue, 8 Mar 2022 09:55:53 +0000 (09:55 +0000)
commitad399fb309f802503a8652125d2bdf75ea64e0ba
tree1cff715a9207331cea012bf6e6c0def77dbdf403
parent2992cc0bd3baee42e169ec0399f24019f82d23da
test-prune: Read to the end of cut(1) output

If we use head(1) to take only the first two lines, then cut(1) and
earlier pipeline entries are killed by SIGPIPE (if they have not already
terminated), and that's flagged as an error under `set -o pipefail`.
Use an equivalent sed command to take exactly the second line, but
without SIGPIPE.

Signed-off-by: Simon McVittie <smcv@debian.org>
Gbp-Pq: Name test-prune-Read-to-the-end-of-cut-1-output.patch
tests/test-prune.sh